home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / DLGoodies / newshell.dopus5 < prev    next >
Text File  |  1996-08-29  |  665b  |  37 lines

  1. /*
  2.  *  Invoke Newshell with the current directory either that of the source
  3.  *  lister or if inactive, in DefaultDir.
  4.  *
  5.  *  V1.0 (5.7.96) by David Lübbren.
  6.  *
  7.  *  Call: Arexx DOpus5:Arexx/newshell.dopus5 {Qp}
  8.  */
  9.  
  10.  
  11. DefaultDir = 'ram:'
  12.  
  13. OPTIONS RESULTS
  14.  
  15. PARSE ARG dopusport
  16. IF dopusport ~= "" THEN ADDRESS VALUE dopusport
  17. ELSE DO
  18.   SAY "No DOpus running !"
  19.   EXIT
  20. END
  21.  
  22. SourcePath = DefaultDir
  23.  
  24. lister query SOURCE
  25. IF rc = 0 THEN DO
  26.   PARSE VAR result handle .
  27.   lister query handle path
  28.   IF rc = 0 THEN DO
  29.     SourcePath = STRIP(result, 'B', '"')
  30.   END
  31. END
  32.  
  33. PRAGMA('Directory', SourcePath)
  34. ADDRESS COMMAND 'Newshell CON:30/50/630/400//alt580/14/30/30/CLOSE'
  35. EXIT
  36.  
  37.